<?php
// var_dump(123);
$username = $_GET['username'];
// echo 111;
// echo $username;
$link = mysqli_connect("localhost","root","root","2116");
$sql = "SELECT * FROM users WHERE username='$username'";
$res = mysqli_query($link,$sql);
$one = mysqli_fetch_assoc($res);
// print_r($one);
if(!empty($one)){
	$arr['info'] = "用户名存在";
	// if(info=="用户名存在")
	$arr['status'] = 1; //状态码
}else{
	$arr['info'] = "用户名不存在";
	// if(info=="用户名存在")
	$arr['status'] = 0; 
}

echo json_encode($arr);


?>